<?php

namespace RPPrincipal\RPPBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class DefaultController extends Controller
{
    public function indexAction()
    {
        $usuario = $this->get('security.context')->getToken()->getUser();
        $personasRPP = $this->get('doctrine')
                          ->getRepository('RPPBundle:Personas',
                                'rpp')
                          ->findAll();
        
        return $this->render('RPPBundle:Default:index.html.twig', array(
            'usuario' => $usuario,
            'personas' => $personasRPP
            
        ));
    }
}
